package Lista1

object q02 {

  def main(args: Array[String]): Unit = {
    println("Entre com 4 valores")
    val a = readInt()
    val b = readInt()
    val c = readInt()
    val d = readInt()
    val x = (a + b + c + d) / 4
    println("Media �: " + x)
    //maior
    if (a > x)
      println("Maior: " + a)
    if (b > x)
      println("Maior: " + b)
    if (c > x)
      println("Maior: " + c)
    if (d > x)
      println("Maior: " + d)
    //menor  
    if (a < x)
      println("Menor: " + a)
    if (b < x)
      println("Menor: " + b)
    if (c < x)
      println("Menor: " + c)
    if (d < x)
      println("Menor: " + d)
  }

}